package com.example.ruiji.controller;

import com.example.ruiji.common.Result;
import com.example.ruiji.entity.Orders;
import com.example.ruiji.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    OrderService orderService;

    @PostMapping("/submit")
    public Result<String> submit(@RequestBody Orders orders) {
        return orderService.submit(orders);
    }
}
